package com.partners.dao.basic;

import com.partners.dao.bo.PermissionDO;
import com.partners.dao.bo.UserDO;
import com.partners.dao.dto.UserInfoOutputDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserDao {
    int deleteByPrimaryKey(Integer id);

    int insert(UserDO record);

    int insertSelective(UserDO record);

    UserDO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserDO record);

    int updateByPrimaryKey(UserDO record);

    UserInfoOutputDTO getUserInfoById(@Param("id") Integer id);

    Integer getUserInfoByPhone(@Param("phone") Long phone, @Param("id") Integer id);

    Integer getLastCode();

    List<PermissionDO> getRolePermissionByUid(@Param("uid") Integer uid);

    List<Map<String,Object>> getUserByUid(@Param("uid") Integer uid);

    List<Map<String,Object>> allUserList();

    UserInfoOutputDTO getUserDetailById(Integer id);

    String getGroupNameByUid(Integer id);


    UserDO getMyRecommondUserById(Integer uid);

    List<String> selectOpenidByUserId(@Param("userlist") List<Integer> userlist);


    Integer getUserByOpenId(String openId);
}
